<div class="editcate_top">
    <h2>Cập nhật khuyến mại</h2>
    <a href="javascript:void(0)" onclick ="$('#light_adct').hide();$('#fade_adct').hide()"><img src="<?php echo img_link('close.png', 'admin'); ?>" class="png" /></a>
</div>


    <?php if($this->message->has('error')):?>
	<div><h2><?php echo $this->message->display();?></h2></div>
	<?php endif;?>

<form enctype="multipart/form-data" method="post" action="" id="user_form">
<div class="editcate_ct">
	<div class="boxadd">
    	<ul class="linect">
            <li>
                <span class="left"><b>Tiêu đề:</b></span>
                <span class="right"><input type="text" name="name" value="<?php echo ($row ? $row->name : '');?>" style="width:40%;" /></span>
            </li>
            <li>
                <span class="left"><b>Liên kết: </b></span>
                <span class="right"><input name="url" value="<?php echo ($row ? $row->url : '');?>" type="text" style="width:40%;"></span>
            </li>
            <li>
                <span class="left"><b>Ảnh: </b></span>
                <span class="right">
                    <input type="file" name="img"/>
                    <br /><br />
                    <?php if($row):?>
                        <?php if(strrpos($row->source,'.swf')==true):?>
                            <object align="middle" width="60" height="40" id="maxsun" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
            				<param value="<?php echo site_url($row->source);?>" name="movie">
            				<param value="high" name="quality">
            				<param value="#ffffff" name="bgcolor">
            				<param value="true" name="play">
            				<param value="true" name="loop">
            				<param value="window" name="wmode">
            				<param value="showall" name="scale">
            				<param value="true" name="menu">
            				<param value="false" name="devicefont">
            				<param value="" name="salign">
            				<param value="sameDomain" name="allowScriptAccess">
            				<!--[if !IE]>-->
            				<object width="60" height="40" data="<?php echo site_url($row->source);?>" type="application/x-shockwave-flash">
            					<param value="<?php echo site_url($row->source);?>" name="movie">
            					<param value="high" name="quality">
            					<param value="#ffffff" name="bgcolor">
            					<param value="true" name="play">
            					<param value="true" name="loop">
            					<param value="window" name="wmode">
            					<param value="showall" name="scale">
            					<param value="true" name="menu">
            					<param value="false" name="devicefont">
            					<param value="" name="salign">
            					<param value="sameDomain" name="allowScriptAccess">
            				<!--<![endif]-->
            					<a href="http://www.adobe.com/go/getflash">
            						<img alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif">
            					</a>
            				<!--[if !IE]>-->
            				</object>
            				<!--<![endif]-->
            			</object>
                        <?php else:?>
                            <img width="60" height="40" src="<?php echo site_url($row->source);?>"/>
                        <?php endif;?>
                    <?php endif;?>
                </span>
            </li>
            <li>
                <span class="left"><b>Chiều ngang: </b></span>
                <span class="right">
                   <input name="width" style="width: 80px;" value="<?php echo($row ? $row->width : '220')?>"/>
                </span>
            </li>
            <li>
                <span class="left"><b>Chiều cao: </b></span>
                <span class="right">
                   <input name="height" value="<?php echo($row ? $row->height : '150')?>" style="width: 80px;"/>
                </span>
            </li>
            <li>
                <span class="left"><b>Trạng thái: </b></span>
                <span class="right">
                    <select name="status">
                        <option <?php echo ($row && $row->status=='yes' ? 'selected="selected"' : '');?> value="yes">Họa động</option>
                        <option <?php echo ($row && $row->status=='no' ? 'selected="selected"' : '');?> value="no">Không họa động</option>
                    </select>
                </span>
            </li>
            <!-- 
            <li>
                <span class="left"><b>Nhóm: </b></span>
                <span class="right">
				    <select name="group_id" style="width: 200px; margin-left:5px;">
				        <?php foreach($group_list as $i => $g): ?>
				        <option <?php if($g['group_id'] == set_value('group_id')) echo 'selected'; ?> value="<?php echo $g['group_id']; ?>"><?php echo ucfirst($g['group_name']); ?></option>
				        <?php endforeach; ?>
				    </select>
                </span>
            </li>
        	-->
        </ul>
    </div>
    <div class="btarticle">
    	<input type="button" value="Cancel" class="btn" onclick="$('#light_adct').hide();$('#fade_adct').hide();" />
        <input type="submit" value="Save & Continute" class="btn" />

    </div>
</div>
</form>